import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'hash',
  // base: __dirname,
  routes: [
    {
      path: '/main/',
      name: 'common',
      component: require('@/components/mainWindow/common').default,
      children: [
        {
          path: 'translate',
          name: 'translate',
          component: require('@/components/mainWindow/translate').default
        }
        , {
          path: 'ofmonkey',
          name: 'ofmonkey',
          component: require('@/components/mainWindow/').default
        },
        {
          path: 'timestr',
          name: 'ofmonkey',
          component: require('@/components/mainWindow/timestr').default
        },
        {
          path: 'jsdecode',
          name: 'ofmonkey',
          component: require('@/components/mainWindow/jsdecode').default
        },
        {
          path: 'note',
          name: 'ofmonkey',
          component: require('@/components/mainWindow/note').default
        },
        {
          path: 'generator',
          name: 'generator',
          component: require('@/components/mainWindow/generator').default
        },
      ]
    },

    {
      path: '/note',
      name: 'note-page',
      component: require('@/components/noteWindow/index').default
    },
    {
      path: '/about',
      name: 'about-page',
      component: require('@/components/about/index').default
    },
    {
      path: '/play',
      name: 'play-page',
      component: require('@/components/play').default
    },
    {
      path: '*',
      redirect: '/'
    }
  ]
})
